import axios from '@/libs/api.request'
// 菜单列表
export const menuList = data => {
  return axios.request({
    url: '/sys/menu/list',
    method: 'get',
    data
  })
}
// 菜单信息
export const menuInfo = data => {
  return axios.request({
    url: `/sys/menu/info/${data.menuId}`,
    method: 'get',
    data
  })
}
// 导航菜单
export const menuNav = data => {
  return axios.request({
    url: '/sys/menu/nav',
    method: 'get',
    data
  })
}
// 查询不包含按钮的菜单列表
export const menuSelect = data => {
  return axios.request({
    url: '/sys/menu/select',
    method: 'get',
    data
  })
}

// 保存菜单
export const menuSave = data => {
  return axios.request({
    url: '/sys/menu/save',
    method: 'post',
    data
  })
}
// 删除菜单
export const menuDelete = data => {
  return axios.request({
    url: `/sys/menu/delete/${data.menuId}`,
    method: 'post',
    data
  })
}
// 修改菜单
export const menuUpdate = data => {
  return axios.request({
    url: '/sys/menu/update',
    method: 'post',
    data
  })
}
